home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume23 / trn / part03 < prev    next >
Encoding:
Text File  |  1991-08-22  |  65.1 KB  |  2,128 lines

  1. This is a new archive version of TRN at patchlevel 3.
  2. The original posting took up Volume23, issues 60 to 73, with
  3. various problems.  These files replace those issues.
  4.  
  5. #! /bin/sh
  6. # This is a shell archive.  Remove anything before this line, then feed it
  7. # into a shell via "sh file" or similar.  To overwrite existing files,
  8. # type "sh file -c".
  9. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  10. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  11. # Contents:  Configure.1 mt.check.SH trn.1.1
  12. # Wrapped by rsalz@litchi.bbn.com on Fri Aug 23 16:38:52 1991
  13. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  14. echo If this archive is complete, you will see the following message:
  15. echo '          "shar: End of archive 3 (of 14)."'
  16. if test -f 'Configure.1' -a "${1}" != "-c" ; then 
  17.   echo shar: Will not clobber existing file \"'Configure.1'\"
  18. else
  19.   echo shar: Extracting \"'Configure.1'\" \(23282 characters\)
  20.   sed "s/^X//" >'Configure.1' <<'END_OF_FILE'
  21. X#!/bin/sh
  22. X#
  23. X# If these # comments don't work, trim them.  Don't worry about the other
  24. X# shell scripts, Configure will trim # comments from them for you.
  25. X#
  26. X# $Header: Configure,v 4.3.3.3 91/01/16 02:00:36 davison Trn $
  27. X#
  28. X# $Log:    Configure,v $
  29. X# Revision 4.3.3.3  91/01/16  02:00:36  davison
  30. X# Integrated rn patches 48-54 and tweaked sitename handling.
  31. X# 
  32. X# Revision 4.3.3.2  90/08/20  16:09:59  davison
  33. X# Added MMDF support, revised sitename/domain/signal/tzset/PATH.
  34. X# 
  35. X# Revision 4.3.3.1  90/07/24  21:56:31  davison
  36. X# Initial Trn Release
  37. X# 
  38. X# Revision 4.3.2.37  90/12/30  03:46:54  sob
  39. X# Changed "hidden" to "hiddennet" to be like nntp and bnews.
  40. X# Made it possible to cancel articles if hiddennet is defined.
  41. X# 
  42. X# Revision 4.3.2.36  90/12/30  03:31:17  sob
  43. X# Better NeXT support and some other problems corrected.
  44. X# 
  45. X# Revision 4.3.2.35  90/12/04  02:51:20  sob
  46. X# Removed redundant "addcflags" label
  47. X# 
  48. X# Revision 4.3.2.34  90/11/22  17:49:31  sob
  49. X# Fixed bug in "hidden" code.
  50. X# 
  51. X# Revision 4.3.2.33  90/11/22  13:42:44  sob
  52. X# Added support for the Uniq System V.3 OS (courtesy of a3@rivm.nl &
  53. X# frans@rivm.nl).
  54. X# Added support for making all mail and news appear to come from the domain
  55. X# itself instead of individual hosts within a domain.
  56. X# 
  57. X# Revision 4.3.2.32  90/11/22  13:30:37  sob
  58. X# Fixes to make using the supplied ndir.c work correctly.
  59. X# Fixes to make building rn on an Apollo work correctly.
  60. X# 
  61. X# Revision 4.3.2.31  90/11/10  00:08:08  sob
  62. X# This one appears to work for Interactive Unix.
  63. X# 
  64. X# Revision 4.3.2.30  90/11/09  23:29:16  sob
  65. X# Added a few line for making rrn under Interactive Unix easier.
  66. X# 
  67. X# Revision 4.3.2.29  90/11/05  23:26:21  sob
  68. X# Added detection of /usr/include/sys/ptem.h for more recent versions
  69. X# of System V.
  70. X# 
  71. X# Revision 4.3.2.28  90/11/04  03:35:01  sob
  72. X# Added better detection for getwd() and getcwd(). This will hopefully be
  73. X# the last hurrah of this problem (naive, aren't I?)
  74. X# 
  75. X# Revision 4.3.2.27  90/10/06  11:54:56  sob
  76. X# Added check for memcpy/bcopy.
  77. X# 
  78. X# Revision 4.3.2.26  90/10/01  01:39:43  sob
  79. X# Altered the FLAGS for SCO Xenix 286. The old one are commented out. Let's
  80. X# see if this works better.
  81. X# 
  82. X# Revision 4.3.2.25  90/05/12  17:34:53  sob
  83. X# Still more XENIX fixes and fixes for using socketlib when rrn and not when
  84. X# just rn.
  85. X# 
  86. X# Revision 4.3.2.24  90/05/12  14:07:43  sob
  87. X# Fixed up LDFLAGS for xenix 286
  88. X# 
  89. X# Revision 4.3.2.23  90/05/04  00:42:31  sob
  90. X# Fixes for Pyramids, more on the return value of signal() and
  91. X# syncing up the use of socketlib.
  92. X# 
  93. X# Revision 4.3.2.22  90/04/17  15:44:24  sob
  94. X# Added better directory structure detection.
  95. X# 
  96. X# Revision 4.3.2.21  90/04/14  19:36:38  sob
  97. X# Added better support for the NeXT.
  98. X# 
  99. X# Revision 4.3.2.20  90/04/14  01:53:36  sob
  100. X# Spelling Problem!
  101. X# 
  102. X# Revision 4.3.2.19  90/03/17  21:33:21  sob
  103. X# Reworked VOIDSIG into SIGRET.
  104. X# 
  105. X# Revision 4.3.2.18  90/03/17  17:45:25  sob
  106. X# Changes to detect when to use termio and when not to.
  107. X# 
  108. X# Revision 4.3.2.17  90/03/17  16:53:11  sob
  109. X# Applied a patch to correctly determine being on a Sun running OS 4.0 or
  110. X# later.
  111. X# 
  112. X# Revision 4.3.2.16  89/12/20  23:20:38  sob
  113. X# Added hp-ux support suggested by tml@hemuli.atk.vtt.fi. Also,
  114. X# corrected some bugs reported by tml@hemuli.atk.vtt.fi.
  115. X# 
  116. X# Revision 4.3.2.15  89/12/18  00:02:04  sob
  117. X# Fixed bug reported by Jim Thompson <jthomp@sun.com> on the
  118. X# use of ypmatch against the so-called services.byname YP map.
  119. X# Sigh. Will YP EVER work?
  120. X# 
  121. X# Revision 4.3.2.14  89/12/17  12:55:39  sob
  122. X# Minor bug fix to yp detection code.
  123. X# 
  124. X# Revision 4.3.2.13  89/12/17  01:53:21  sob
  125. X# Changed from using ypcat to using ypmatch
  126. X# 
  127. X# Revision 4.3.2.12  89/12/15  19:35:20  sob
  128. X# getpwent was not getting defined when YP is present.
  129. X# bug reported by dglo@ads.com
  130. X# 
  131. X# Revision 4.3.2.11  89/12/13  00:42:59  sob
  132. X# Included suggested patches by weening@gang-of-four.stanford.edu.
  133. X# 
  134. X# Revision 4.3.2.10  89/12/09  01:47:49  sob
  135. X# Configure now removes myread when exiting.
  136. X# 
  137. X# Revision 4.3.2.9  89/12/08  22:41:14  sob
  138. X# Added minor changes suggested by weening@Gang-of-Four.Stanford.EDU and
  139. X# jik@pit-manager.mit.edu
  140. X# 
  141. X# Revision 4.3.2.8  89/11/28  00:30:06  sob
  142. X# Attempted to make some of the references to the news software version
  143. X# levels more clear for the benefit of novice news installers.
  144. X# 
  145. X# Revision 4.3.2.7  89/11/27  02:25:26  sob
  146. X# Better detection of SunOS 4.0 and getpwent will be used on systems
  147. X# that support YP, just in case.
  148. X# 
  149. X# Revision 4.3.2.6  89/11/27  01:32:56  sob
  150. X# Added some changes suggested by various usenet postings.
  151. X# Limited support for NeXT.
  152. X# 
  153. X# Revision 4.3.2.5  89/11/08  04:47:27  sob
  154. X# Added VOIDSIG handling for SunOS 4.X
  155. X# 
  156. X# Revision 4.3.2.4  89/11/06  00:05:38  sob
  157. X# Added RRN support originally distributed with NNTP 1.5
  158. X# 
  159. X# Revision 4.3.2.3  89/11/05  23:35:43  sob
  160. X# Added checks for ultrix and sun
  161. X#
  162. X# Revision 4.3.1.6  86/07/24  14:41:18  lwall
  163. X# Handles missing Relay-Version: from news 2.10.3 headers.
  164. X#
  165. X# Revision 4.3.1.5  85/05/23  11:23:22  lwall
  166. X# filexp flubs sed command.
  167. X# 
  168. X# Revision 4.3.1.4  85/05/20  17:13:11  lwall
  169. X# Makes sure -lcurses is really a terminfo library.
  170. X# Puts single instead of double quotes around defs in config.sh.
  171. X# 
  172. X# Revision 4.3.1.3  85/05/16  16:48:48  lwall
  173. X# Took space from end of filexp output.
  174. X# 
  175. X# Revision 4.3.1.2  85/05/13  15:54:35  lwall
  176. X# Libraries in /usr/local/lib shouldn't use -l switch.
  177. X# 
  178. X# Revision 4.3.1.1  85/05/10  11:29:20  lwall
  179. X# Branch for patches.
  180. X# 
  181. X# Revision 4.3  85/05/01  11:31:23  lwall
  182. X# Baseline for release with 4.3bsd.
  183. X# 
  184. X
  185. X# Yes, you may rip this off to use in other distribution packages.
  186. X
  187. XWHITE='[     ]'; : there should be a tab and a space between the brackets.
  188. XCTRLA=''; : there should be a control-A between the single-quotes.
  189. X
  190. Xn=''
  191. Xc=''
  192. Xlibc=''
  193. Xeunicefix=''
  194. Xeunice=''
  195. Xcpp=''
  196. Xshsharp=''
  197. Xspitshell=''
  198. Xstartsh=''
  199. Xtest=''
  200. Xexpr=''
  201. Xsed=''
  202. Xecho=''
  203. Xcat=''
  204. Xrm=''
  205. Xmv=''
  206. Xcp=''
  207. Xtail=''
  208. Xtr=''
  209. Xmkdir=''
  210. Xsort=''
  211. Xuniq=''
  212. Xinews=''
  213. Xgrep=''
  214. Xegrep=''
  215. Xnidump=''
  216. Xypmatch=''
  217. Xcontains=''
  218. Xlib=''
  219. Xnametype=''
  220. Xcc=''
  221. Xiandd=''
  222. Xinclude=''
  223. Xrrninclude=''
  224. Xtermlib=''
  225. Xjobslib=''
  226. Xndirlib=''
  227. Xsocketlib=''
  228. Xdirtype=''
  229. Xdirinc=''
  230. Xlibndir=''
  231. Xusendir=''
  232. Xndirc=''
  233. Xndiro=''
  234. Xpager=''
  235. Xmailer=''
  236. Xinternet=''
  237. Xrnbin=''
  238. Xfilexp=''
  239. Xdistlist=''
  240. XLog=''
  241. XHeader=''
  242. Xsitename=''
  243. Xhostfile=''
  244. Xdomain=''
  245. Xorgname=''
  246. Xisadmin=''
  247. Xnewsadmin=''
  248. Xrnlib=''
  249. Xmansrc=''
  250. Xmanext=''
  251. Xmaildir=''
  252. Xspool=''
  253. Xactive=''
  254. Xmyactive=''
  255. Xmininact=''
  256. Xpref=''
  257. Xdefeditor=''
  258. Xrootid=''
  259. Xmboxchar=''
  260. Xlocpref=''
  261. Xorgpref=''
  262. Xcitypref=''
  263. Xstatepref=''
  264. Xcntrypref=''
  265. Xcontpref=''
  266. Xstrchr=''
  267. Xmemcpy=''
  268. Xrename=''
  269. Xtruncate=''
  270. Xchsize=''
  271. Xtzset=''
  272. Xthreaddef=''
  273. Xselectdef=''
  274. Xthreaddir=''
  275. Xnovoid=''
  276. Xnovfork=''
  277. Xportable=''
  278. Xpassnam=''
  279. Xberknam=''
  280. Xusgnam=''
  281. Xwhoami=''
  282. Xtermio=''
  283. Xfcntl=''
  284. Xioctl=''
  285. Xptem=''
  286. Xnormsig=''
  287. Xsigblock=''
  288. Xsigret=''
  289. Xgetuidgid=''
  290. Xgetcwd=''
  291. Xgetwd=''
  292. Xhavetlib=''
  293. Xgetpwent=''
  294. Xgethostname=''
  295. Xdouname=''
  296. Xphostname=''
  297. Xhostcmd=''
  298. Xnorelay=''
  299. Xisrrn=''
  300. Xrdchk=''
  301. Xserverfile=''
  302. XNNTPSRC=''
  303. XCONFIG=''
  304. Xhiddennet=''
  305. X
  306. Xecho "Beginning of configuration questions for trn."
  307. X: Eunice requires " " instead of "", can you believe it
  308. Xecho " "
  309. X
  310. X: sanity checks
  311. XPATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/bsd'
  312. Xexport PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  313. X
  314. Xif test ! -t 0; then
  315. X    echo "Type 'sh Configure', not 'sh <Configure'"
  316. X    exit 1
  317. Xfi
  318. X
  319. X: some greps do not return status, grrr.
  320. Xecho "grimblepritz" >grimble
  321. Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
  322. X    contains=contains
  323. Xelse
  324. X    if grep grimblepritz grimble >/dev/null 2>&1 ; then
  325. X    contains=grep
  326. X    else
  327. X    contains=contains
  328. X    fi
  329. Xfi
  330. X
  331. X: the following should work in any shell
  332. Xcase $contains in
  333. Xcontains*)
  334. X    echo " "
  335. X    echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
  336. X    cat >contains <<'EOSS'
  337. Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
  338. XEOSS
  339. Xchmod 755 contains
  340. Xesac
  341. X
  342. X: first determine how to suppress newline on echo command
  343. Xecho "Checking echo to see how to suppress newlines..."
  344. X(echo "hi there\c" ; echo " ") >.echotmp
  345. Xif $contains c .echotmp >/dev/null 2>&1 ; then
  346. X    echo "...using -n."
  347. X    n='-n'
  348. X    c=''
  349. Xelse
  350. X    echo "...using \\\c."
  351. X    n=''
  352. X    c='\c'
  353. Xfi
  354. Xecho $n "Type carriage return to continue.  Your cursor should be here-->$c"
  355. Xread ans
  356. Xrm .echotmp
  357. X
  358. X: now set up to do reads with possible shell escape
  359. X: if this does not work on your machine, 1,$s/. myread/read ans/
  360. Xcat <<EOSC >myread
  361. Xans='!'
  362. Xwhile expr "X\$ans" : "X!" >/dev/null; do
  363. X    read ans
  364. X    case "\$ans" in
  365. X    !)
  366. X    sh
  367. X    echo " "
  368. X    echo $n "Your answer: $c"
  369. X    ;;
  370. X    !*)
  371. X    set \`expr "X\$ans" : "X!\(.*\)\$"\`
  372. X    sh -c "\$*"
  373. X    echo " "
  374. X    echo $n "Your answer: $c"
  375. X    ;;
  376. X    esac
  377. Xdone
  378. XEOSC
  379. X
  380. X: general instructions
  381. Xcat <<'EOH'
  382. XThis installation shell script will examine your system and ask you questions
  383. Xto determine how trn and its auxiliary files should be installed.  If you
  384. Xget stuck on a question, you may use a ! shell escape to start a subshell or
  385. Xexecute a command.  Many of the questions will have default answers in
  386. Xsquare brackets--typing carriage return will give you the default.
  387. X
  388. XOn some of the questions which ask for file or directory names you are
  389. Xallowed to use the ~name construct to specify the login directory belonging
  390. Xto "name", even if you don't have a shell which knows about that.  Questions
  391. Xwhere this is allowed will be marked "(~name ok)".
  392. X
  393. XMuch effort has been expended to ensure that this shell script will run
  394. Xon any Unix system.  If despite that it blows up on you, your best bet is to
  395. Xedit Configure and run it again.  (Trying to install trn without having run
  396. XConfigure is well nigh impossible.)  Also, tell Wayne (davison@dri.com)
  397. Xhow he blew it.
  398. X
  399. XThis installation script affects things in two ways: 1) it does direct
  400. Xvariable substitutions on some of the files included in this kit, and
  401. X2) it builds a config.h file for inclusion in C programs.  You may edit
  402. Xany of these files as the need arises after running this script.
  403. X
  404. XEOH
  405. Xecho $n "[Type carriage return to continue] $c"
  406. X. myread
  407. XXn=$n
  408. XXc=$c
  409. X: get old answers, if there is a config file out there
  410. Xif test -f config.sh; then
  411. X    echo " "
  412. X    echo "(Fetching default answers from your old config.sh file...)"
  413. X    . ./config.sh
  414. Xfi
  415. Xn=$Xn
  416. Xc=$Xc
  417. X
  418. X: get list of predefined functions in a handy place
  419. Xecho " "
  420. Xif test -f /lib/libc.a; then
  421. X    echo "Your C library is in /lib/libc.a.  You're normal."
  422. X    libc=/lib/libc.a
  423. Xelse
  424. X    if test -f /lib/Llibc.a; then
  425. X    echo "Your C library is in /lib/Llibc.a.  I smell Xenix!"
  426. X    libc=/lib/Llibc.a
  427. X    else
  428. X    if test -f /usr/lib/libc.a; then
  429. X        echo "Your C library is in /usr/lib/libc.a, of all places."
  430. X        libc=/usr/lib/libc.a
  431. X    else
  432. X        if test -f /lib/clib; then
  433. X        echo "Your C library is in /lib/clib.  How nonstandard, must be Apollo."
  434. X        libc=/lib/clib
  435. X        else
  436. X        if test -f "$libc"; then
  437. X            echo "Your C library is in $libc, like you said before."
  438. X        else
  439. X            cat <<'EOM'
  440. XI can't seem to find your C library.  I've looked for /lib/libc.a and
  441. X/usr/lib/libc.a, but neither of those are there. Perhaps you can find
  442. Xout by reading `man 3 intro' if you have the 'man' facility installed.
  443. X
  444. XEOM
  445. X            echo $n "What is the full name of your C library? $c"
  446. X            . myread
  447. X            libc="$ans"
  448. X        fi
  449. X        fi
  450. X    fi
  451. X    fi
  452. Xfi
  453. Xecho " "
  454. Xecho $n "Extracting names from $libc for later perusal...$c"
  455. Xif ar t $libc >libc.list 2>/dev/null; then
  456. X    echo "done"
  457. Xelse
  458. X     if test $libc = /lib/clib; then
  459. X    if nm -g $libc | sed -e 's/$/.o/' >libc.list; then
  460. X        echo "done"
  461. X    else
  462. X        echo " "
  463. X        echo "Apparently $libc is not an object module. Try again."
  464. X        exit 1
  465. X    fi
  466. X    else
  467. X    echo " "
  468. X    echo "The archiver doesn't think $libc is a reasonable library."
  469. X    exit 1
  470. X    fi
  471. Xfi
  472. X: make some quick guesses about what we are up against
  473. Xecho " "
  474. Xecho $n "Hmm...  $c"
  475. Xif $contains sigvec.o libc.list >/dev/null 2>&1 ; then
  476. X    echo "Looks kind of like a BSD system, but we'll see..."
  477. X    echo exit 0 >bsd
  478. X    echo exit 1 >usg
  479. X    echo exit 1 >v7
  480. Xelse
  481. X    if $contains dup2.o libc.list >/dev/null 2>&1 ; then
  482. X    echo "Looks sort of like a V7 system, but we'll see..."
  483. X    echo exit 1 >bsd
  484. X    echo exit 1 >usg
  485. X    echo exit 0 >v7
  486. X    else
  487. X        echo "Looks kind of like a USG system, but we'll see..."
  488. X        echo exit 1 >bsd
  489. X        echo exit 0 >usg
  490. X        echo exit 1 >v7
  491. X    fi
  492. Xfi
  493. X:
  494. Xif test -f /etc/inittab; then
  495. X    echo "You have an inittab file. You must be a USG system!"
  496. X    echo exit 1 >bsd
  497. X    echo exit 0 >usg
  498. X    echo exit 1 >v7
  499. Xfi
  500. Xif $contains vmssystem.o libc.list >/dev/null 2>&1 ; then
  501. X    cat <<'EOI'
  502. XThere is, however, a strange, musty smell in the air that reminds me of
  503. Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
  504. XEOI
  505. X    echo "exit 0" >eunice
  506. X    eunicefix=unixtovms
  507. X    eunice=define
  508. X: it so happens the Eunice I know will not run shell scripts in Unix format
  509. Xelse
  510. X    echo " "
  511. X    echo "Congratulations.  You aren't running Eunice."
  512. X    eunicefix=':'
  513. X    eunice=undef
  514. X    echo "exit 1" >eunice
  515. Xfi
  516. Xchmod 755 bsd usg v7 eunice
  517. X$eunicefix bsd usg v7 eunice
  518. X: see how we invoke the C preprocessor
  519. Xecho " "
  520. Xecho "Checking to see how your C preprocessor is invoked..."
  521. Xcat <<'EOT' >testcpp.c
  522. X#define ABC abc
  523. X#define XYZ xyz
  524. XABC+XYZ
  525. XEOT
  526. Xecho 'Maybe "cc -E" will work...'
  527. Xcc -E testcpp.c >testcpp.out 2>&1
  528. Xif $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  529. X    echo "Yup, it does."
  530. X    cpp='cc -E'
  531. Xelse
  532. X    echo 'Nope...maybe "cc -P" will work...'
  533. X    cc -P testcpp.c >testcpp.out 2>&1
  534. X    if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  535. X    echo "Yup, that does."
  536. X    cpp='cc -P'
  537. X    else
  538. X    echo 'Nixed again...maybe "/lib/cpp" will work...'
  539. X    /lib/cpp testcpp.c >testcpp.out 2>&1
  540. X    if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  541. X        echo "Hooray, it works!  I was beginning to wonder."
  542. X        cpp='/lib/cpp'
  543. X    else
  544. X        if $contains 'abc +xyz' testcpp.out >/dev/null 2>&1 ; then
  545. X        echo "Found it!  You're on a NeXT, aren't you?"
  546. X        cpp='/lib/cpp'
  547. X        else
  548. X        echo 'Hmm...maybe you already told me...'
  549. X        case "$cpp" in
  550. X        '') ;;
  551. X        *) $cpp testcpp.c >testcpp.out 2>&1;;
  552. X        esac
  553. X        if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  554. X            echo "Hooray, you did!  I was beginning to wonder."
  555. X        else
  556. X            echo "Nope. I can't find a C preprocessor.  Name one: $c"
  557. X            . myread
  558. X            cpp="$ans"
  559. X            $cpp testcpp.c >testcpp.out 2>&1
  560. X            if $contains 'abc+xyz' testcpp.out >/dev/null 2>&1 ; then
  561. X            echo "OK, that will do."
  562. X            else
  563. X            echo "Sorry, I can't get that to work.  Go find one."
  564. X            exit 1
  565. X            fi
  566. X        fi
  567. X        fi
  568. X    fi
  569. X    fi
  570. Xfi
  571. Xrm -f testcpp.c testcpp.out
  572. X: check for pdp11
  573. Xecho " "
  574. Xcat <<'EOT' >pdp11.c
  575. X#ifdef pdp11
  576. Xexit 0
  577. X#else
  578. Xexit 1
  579. X#endif
  580. XEOT
  581. X$cpp pdp11.c | grep exit >pdp11
  582. Xchmod 755 pdp11
  583. X$eunicefix pdp11
  584. Xrm pdp11.c
  585. Xif pdp11; then
  586. X    echo "This looks like a pdp11 to me."
  587. Xfi
  588. X: check for ultrix
  589. Xcat <<'EOT' >ultrix.c
  590. X#ifdef ultrix
  591. Xexit 0
  592. X#else
  593. Xexit 1
  594. X#endif
  595. XEOT
  596. X$cpp ultrix.c | grep exit >ultrix
  597. Xchmod 755 ultrix
  598. X$eunicefix ultrix
  599. Xrm ultrix.c
  600. Xif ultrix; then
  601. X    echo "Running ultrix, eh?"
  602. Xfi
  603. X
  604. X: check for sun 4.0
  605. Xcat <<'EOT' >sun.c
  606. X#ifdef sun
  607. Xexit 0
  608. X#else
  609. Xexit 1
  610. X#endif
  611. XEOT
  612. X$cpp sun.c | grep exit >sun
  613. Xchmod 755 sun
  614. X$eunicefix sun
  615. Xrm sun.c
  616. Xif sun; then
  617. X    echo "This looks like a sun to me."
  618. X    if test -f /etc/ld.so.cache ; then
  619. X    echo "And it appears you are running SunOS 4.0 or greater."
  620. X    fi
  621. Xfi
  622. X: check for hp-ux
  623. Xcat <<'EOT' >hp-ux.c
  624. X#ifdef hpux
  625. Xexit 0
  626. X#else
  627. Xexit 1
  628. X#endif
  629. XEOT
  630. X$cpp hp-ux.c | grep exit >hp-ux
  631. Xchmod 755 hp-ux
  632. X$eunicefix hp-ux
  633. Xrm hp-ux.c
  634. Xif hp-ux; then
  635. X    echo "Hewlett-Packard must have built this..."
  636. X    socketlib=-lbsdipc
  637. Xfi
  638. X
  639. X: check for sgi
  640. Xcat <<'EOT' >sgi.c
  641. X#ifdef sgi
  642. Xexit 0
  643. X#else
  644. Xexit 1
  645. X#endif
  646. XEOT
  647. X$cpp sgi.c | grep exit >sgi
  648. Xchmod 755 sgi
  649. X$eunicefix sgi
  650. Xrm sgi.c
  651. Xif sgi; then
  652. X    echo "Silicon Graphics must have built this..."
  653. X    include=-I/usr/include/bsd
  654. X    rrninclude="-I/usr/include/bsd -DUSG"
  655. X    socketlib=-lbsd
  656. Xfi
  657. X
  658. X: check for XENIX
  659. Xcat <<'EOT' >xenix
  660. Xtest -f /xenix; exit $?
  661. XEOT
  662. Xchmod 755 xenix
  663. X$eunicefix xenix
  664. Xif xenix; then
  665. X    echo "Kinda looks like XENIX....hmmm"
  666. X    rrninclude="-DUSG -DLAI_TCP"
  667. X    socketlib=-lsocket
  668. X    rdchk=define
  669. X    dirtype=dirent
  670. Xelse
  671. X    rdchk=undef
  672. Xfi
  673. X
  674. X: check for Pyramid OSx
  675. Xcat <<'EOT' >pyr.c
  676. X#ifdef pyr
  677. Xexit 0
  678. X#else
  679. Xexit 1
  680. X#endif
  681. XEOT
  682. X$cpp pyr.c | grep exit >pyr
  683. Xchmod 755 pyr
  684. X$eunicefix pyr
  685. Xrm pyr.c
  686. Xif pyr; then
  687. X    echo "This looks like a Pyramid to me."
  688. Xfi
  689. X
  690. X: check for NeXT
  691. Xcat <<'EOT' >next.c
  692. X#ifdef NeXT
  693. Xexit 0
  694. X#else
  695. Xexit 1
  696. X#endif
  697. XEOT
  698. X$cpp next.c | grep exit >next
  699. Xchmod 755 next
  700. X$eunicefix next
  701. Xrm next.c
  702. Xif next; then
  703. X    echo "My, you really ARE on a NeXT."
  704. X    addcflags='-bsd'
  705. Xfi
  706. X
  707. Xif bsd; then
  708. X    getuidgid=define
  709. Xelse
  710. X    getuidgid=undef
  711. Xfi
  712. X
  713. Xcat <<'EOT' > s5uniq
  714. Xif test -f /bin/uname
  715. Xthen
  716. X    case `uname -r -m` in
  717. X    "5.3 vax-"*)
  718. X        if [ -f /usr/lib/libnet.a \
  719. X          -a -f /usr/lib/libhdb.a \
  720. X          -a -f /usr/lib/libbbn.a \
  721. X          -a -f /usr/lib/libstr.a ]
  722. X        then
  723. X            exit 0
  724. X        fi;;
  725. X    esac
  726. Xfi
  727. Xexit 1
  728. XEOT
  729. Xchmod 755 s5uniq
  730. Xif s5uniq; then
  731. X    echo "This looks like Uniq.  What a pity."
  732. X    socketlib="-lnet -lhdb -lbbn -lstr"
  733. X    rrninclude="-DR_UNIQ -DUSG"
  734. X    # -DR_UNIQ and -DUSG are needed for ~nntp/common/clientlib.c
  735. Xfi
  736. X
  737. X: see if sh knows # comments
  738. Xecho " "
  739. Xecho "Checking your sh to see if it knows about # comments..."
  740. Xif sh -c '#' >/dev/null 2>&1 ; then
  741. X    echo "Your sh handles # comments correctly."
  742. X    shsharp=true
  743. X    spitshell=cat
  744. X    echo " "
  745. X    echo "Okay, let's see if #! works on this system..."
  746. X    echo "#!/bin/echo hi" > try
  747. X    $eunicefix try
  748. X    chmod 755 try
  749. X    try > today
  750. X    if test -s today; then
  751. X    echo "It does."
  752. X    sharpbang='#!'
  753. X    else
  754. X    echo "#! /bin/echo hi" > try
  755. X    $eunicefix try
  756. X    chmod 755 try
  757. X    try > today
  758. X    if test -s today; then
  759. X        echo "It does."
  760. X        sharpbang='#! '
  761. X    else
  762. X        echo "It doesn't."
  763. X        sharpbang=': use '
  764. X    fi
  765. X    fi
  766. Xelse
  767. X    echo "Your sh doesn't grok # comments--I will strip them later on."
  768. X    shsharp=false
  769. X    echo "exec grep -v '^#'" >spitshell
  770. X    chmod 755 spitshell
  771. X    $eunicefix spitshell
  772. X    spitshell=`pwd`/spitshell
  773. X    echo "I presume that if # doesn't work, #! won't work either!"
  774. X    sharpbang=': use '
  775. Xfi
  776. X
  777. X: figure out how to guarantee sh startup
  778. Xecho " "
  779. Xecho "Checking out how to guarantee sh startup..."
  780. Xstartsh=$sharpbang'/bin/sh'
  781. Xecho "Let's see if '$startsh' works..."
  782. Xcat >try <<EOSS
  783. X$startsh
  784. Xset abc
  785. Xtest "$?abc" != 1
  786. XEOSS
  787. X
  788. Xchmod 755 try
  789. X$eunicefix try
  790. Xif try; then
  791. X    echo "Yup, it does."
  792. Xelse
  793. X    echo "Nope.  You may have to fix up the shell scripts to make sure sh runs them."
  794. Xfi
  795. Xrm -f try today
  796. X
  797. X: find out where common programs are
  798. Xecho " "
  799. Xecho "Locating common programs..."
  800. Xpth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /usr/etc /usr/5bin"
  801. Xcat <<EOSC >loc
  802. X$startsh
  803. Xthing=\$1
  804. Xshift
  805. Xdflt=\$1
  806. Xshift
  807. Xfor dir in \$*; do
  808. X    case "\$thing" in
  809. X    .)
  810. X    if test -d \$dir/\$thing; then
  811. X        echo \$dir
  812. X        exit 0
  813. X    fi
  814. X    ;;
  815. X    *)
  816. X    if test -f \$dir/\$thing; then
  817. X        echo \$dir/\$thing
  818. X        exit 0
  819. X    fi
  820. X    ;;
  821. X    esac
  822. Xdone
  823. Xecho \$dflt
  824. Xexit 1
  825. XEOSC
  826. Xchmod 755 loc
  827. X$eunicefix loc
  828. Xloclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep"
  829. Xtrylist="test inews egrep more pg Mcc nidump ypmatch"
  830. Xfor file in $loclist; do
  831. X    xxx=`loc $file $file $pth`
  832. X    eval $file=$xxx
  833. X    case "$xxx" in
  834. X    /*)
  835. X    echo $file is in $xxx.
  836. X    ;;
  837. X    *)
  838. X    echo "I don't know where $file is.  I hope it's in everyone's PATH."
  839. X    ;;
  840. X    esac
  841. Xdone
  842. Xecho " "
  843. Xecho "Don't worry if any of the following aren't found..."
  844. Xfor file in $trylist; do
  845. X    xxx=`loc $file $file $pth`
  846. X    eval $file=$xxx
  847. X    case "$xxx" in
  848. X    /*)
  849. X    echo $file is in $xxx.
  850. X    ;;
  851. X    *)
  852. X    echo "I don't see $file out there, offhand."
  853. X    ;;
  854. X    esac
  855. Xdone
  856. Xcase $egrep in
  857. Xegrep)
  858. X    echo "Substituting grep for egrep."
  859. X    egrep=$grep
  860. X    ;;
  861. Xesac
  862. Xcase $test in
  863. Xtest)
  864. X    echo "Hopefully test is built into your sh."
  865. X    ;;
  866. X/bin/test)
  867. X    echo " "
  868. X    echo $n 'Is your "test" built into sh? [n] (OK to guess) '"$c"
  869. X    . myread
  870. X    case $ans in
  871. X    y*) test=test ;;
  872. X    esac
  873. X    ;;
  874. X*)
  875. X    test=test
  876. X    ;;
  877. Xesac
  878. Xcase $echo in
  879. Xecho)
  880. X    echo "Hopefully echo is built into your sh."
  881. X    ;;
  882. X/bin/echo)
  883. X    echo " "
  884. X    echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
  885. X    $echo $n "hi there$c" >foo1
  886. X    echo $n "hi there$c" >foo2
  887. X    if cmp foo1 foo2 >/dev/null 2>&1; then
  888. X    echo "They are compatible.  In fact, they may be identical."
  889. X    else
  890. X    echo "They are not compatible--the echo builtin will be used."
  891. X    echo=echo
  892. X    fi
  893. X    $rm -f foo1 foo2
  894. X    ;;
  895. X*)
  896. X    echo=echo
  897. X    ;;
  898. Xesac
  899. X$echo " "
  900. X: test yp
  901. Xcase $ypmatch in
  902. Xypmatch)
  903. X    $echo "I don't see ypmatch out there, so YP is not available. We'll search the"
  904. X    $echo "passwd file the old fashioned way!"
  905. X    ;;
  906. X*)
  907. X    $ypmatch 513/tcp services > /dev/null 2>/dev/null
  908. X    status=$?
  909. X    if $test $status  -ne 0 ; then
  910. X    $echo "YP installed, but not operational. We won't use it."
  911. X    ypmatch=""
  912. X    else
  913. X        $echo "YP installed and operational."
  914. X    fi
  915. X    
  916. X    ;;
  917. Xesac
  918. Xif $test "$nidump" = "nidump"; then
  919. X    nidump=""
  920. Xfi
  921. Xif $test "$ypmatch" = "ypmatch"; then
  922. X    ypmatch=""
  923. Xfi
  924. X: decide how portable to be
  925. Xcase "$portable" in
  926. Xdefine) dflt=y;;
  927. X*)    dflt=n;;
  928. Xesac
  929. X$cat <<'EOH'
  930. XI can set things up so that your shell scripts and binaries are more portable,
  931. Xat what may be a noticable cost in performance.  In particular, if you
  932. Xask to be portable, the following happens:
  933. X
  934. X     1) shell scripts will rely on the PATH variable rather than using
  935. X    the paths derived above.
  936. X     2) ~username interpretations will be done at run time rather than
  937. X    by Configure.
  938. X     3) the system name will be determined at run time, if at all possible.
  939. X
  940. XEOH
  941. X$echo $n "Do you expect to run these scripts and binaries on multiple machines? [$dflt] $c"
  942. X. myread
  943. Xcase $ans in
  944. X'') ans=$dflt;;
  945. Xesac
  946. Xcase $ans in
  947. X    y*) portable=define
  948. X    for file in $loclist; do
  949. X        eval $file=$file
  950. X    done
  951. X    ;;
  952. X    *)  portable=undef ;;
  953. Xesac
  954. X
  955. X: set up shell script to do ~ expansion
  956. Xcat >filexp <<EOSS
  957. X$startsh
  958. X: expand filename
  959. Xcase \$1 in
  960. X~/*|~)
  961. X    $echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
  962. X    ;;
  963. X~*)
  964. X    if $test -f /bin/csh; then
  965. X    /bin/csh -f -c "glob \$1"
  966. X    $echo ""
  967. X    else
  968. X    name=\`$expr x\$1 : '..\([^/]*\)'\`
  969. X    if $test "$ypmatch" != ""; then
  970. X         dir=\`$ypmatch \$name passwd 2>/dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/"'\`
  971. X    elif $test "$nidump" != ""; then
  972. X        dir=\`$nidump passwd / | $sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\`
  973. X    fi
  974. X    if $test "\$dir" = ""; then
  975. X        dir=\`$sed </etc/passwd -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\`
  976. X    fi
  977. X    if $test ! -d "\$dir"; then
  978. X        me=\`basename \$0\`
  979. X        $echo "\$me: can't locate home directory for: \$name" >&2
  980. X        exit 1
  981. X    fi
  982. X    case \$1 in
  983. X    */*)
  984. X        $echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
  985. X        ;;
  986. X    *)
  987. X        $echo \$dir
  988. X        ;;
  989. X    esac
  990. X    fi
  991. X    ;;
  992. X*)
  993. X    $echo \$1
  994. X    ;;
  995. Xesac
  996. XEOSS
  997. Xchmod 755 filexp
  998. X$eunicefix filexp
  999. X
  1000. X: try to deal with domains
  1001. X$cat << 'EOH'
  1002. X
  1003. XPlease enter your domain name.  This will be used in conjunction with the
  1004. Xsite name for return addresses on news articles and mail.  If you use the
  1005. X4.3ism of having your domain in your hostname, all the posting programs
  1006. Xwill figure this out on the fly, so don't worry.
  1007. X
  1008. XExamples of some valid domains:
  1009. X    berkeley.edu
  1010. X    nasa.gov
  1011. XExample of an invalid domain in common use:
  1012. X    uucp
  1013. XEOH
  1014. X
  1015. Xcase "$domain" in
  1016. X'') dflt="uucp";;
  1017. END_OF_FILE
  1018.   if test 23282 -ne `wc -c <'Configure.1'`; then
  1019.     echo shar: \"'Configure.1'\" unpacked with wrong size!
  1020.   fi
  1021.   # end of 'Configure.1'
  1022. fi
  1023. if test -f 'mt.check.SH' -a "${1}" != "-c" ; then 
  1024.   echo shar: Will not clobber existing file \"'mt.check.SH'\"
  1025. else
  1026.   echo shar: Extracting \"'mt.check.SH'\" \(1362 characters\)
  1027.   sed "s/^X//" >'mt.check.SH' <<'END_OF_FILE'
  1028. Xcase $CONFIG in
  1029. X    '') . ./config.sh ;;
  1030. Xesac
  1031. Xecho "Extracting mt.check (with variable substitutions)"
  1032. X$spitshell >mt.check <<!GROK!THIS!
  1033. X$startsh
  1034. X# $Header: mt.check.SH,v 4.3.3.3 91/01/16 02:50:10 davison Trn $
  1035. X#
  1036. X# $Log:    mt.check.SH,v $
  1037. X# Revision 4.3.3.3  91/01/16  02:50:10  davison
  1038. X# Added missing grok line at eof.
  1039. X# 
  1040. X# Revision 4.3.3.2  90/08/20  16:42:10  davison
  1041. X# Changed email address.
  1042. X# 
  1043. X# Revision 4.3.3.1  90/06/20  23:00:07  davison
  1044. X# Initial Trn Release
  1045. X# 
  1046. X# mt.check - daily maintenance for mt.log
  1047. X# 
  1048. X# Check mt.log for earth-shattering errors, and mail them to \$gurus if found.
  1049. X# Then move the mt.log file into a week-long history chain.
  1050. X#
  1051. X# Usage: mt.check
  1052. X#
  1053. X
  1054. Xgurus="$newsadmin"
  1055. Xtmp="/tmp/mt.c\$\$"
  1056. X
  1057. XPATH=/bin:/usr/bin
  1058. Xexport PATH
  1059. X
  1060. Xumask 002
  1061. X
  1062. Xtrap "rm -f \$tmp ; exit 0" 0 1 2 15
  1063. X
  1064. Xcd $rnlib
  1065. X
  1066. X$egrep " \\*\\*\$" mt.log >\$tmp
  1067. X
  1068. Xif test -s \$tmp ; then
  1069. X    (cat <<EOT
  1070. XTo: \$gurus
  1071. XSubject: mthreads error!
  1072. X
  1073. XThe following errors were reported in mt.log.  If they persist, please
  1074. Xreport this fact to Wayne Davison (davison@borland.com).
  1075. X
  1076. XEOT
  1077. X    cat \$tmp) | mail \$gurus
  1078. Xfi
  1079. X
  1080. Xtest -f mt.log.6 && mv mt.log.6 mt.log.7
  1081. Xtest -f mt.log.5 && mv mt.log.5 mt.log.6
  1082. Xtest -f mt.log.4 && mv mt.log.4 mt.log.5
  1083. Xtest -f mt.log.3 && mv mt.log.3 mt.log.4
  1084. Xtest -f mt.log.2 && mv mt.log.2 mt.log.3
  1085. Xtest -f mt.log   && mv mt.log   mt.log.2
  1086. Xtouch mt.log
  1087. X
  1088. Xexit 0
  1089. X!GROK!THIS!
  1090. END_OF_FILE
  1091.   if test 1362 -ne `wc -c <'mt.check.SH'`; then
  1092.     echo shar: \"'mt.check.SH'\" unpacked with wrong size!
  1093.   fi
  1094.   chmod +x 'mt.check.SH'
  1095.   # end of 'mt.check.SH'
  1096. fi
  1097. if test -f 'trn.1.1' -a "${1}" != "-c" ; then 
  1098.   echo shar: Will not clobber existing file \"'trn.1.1'\"
  1099. else
  1100.   echo shar: Extracting \"'trn.1.1'\" \(37631 characters\)
  1101.   sed "s/^X//" >'trn.1.1' <<'END_OF_FILE'
  1102. X''' $Header: trn.1,v 4.3.3.3 91/01/16 03:38:44 davison Trn $
  1103. X''' 
  1104. X''' $Log:    trn.1,v $
  1105. X''' Revision 4.3.3.3  91/01/16  03:38:44  davison
  1106. X''' Integrated rn patches 48-54.
  1107. X''' 
  1108. X''' Revision 4.3.3.2  90/08/20  16:50:51  davison
  1109. X''' Changed email address.
  1110. X''' 
  1111. X''' Revision 4.3.3.1  90/07/24  21:30:38  davison
  1112. X''' Initial Trn Release
  1113. X''' 
  1114. X''' Revision 4.3.2.2  90/12/12  03:48:54  sob
  1115. X''' Added documentation for the new "N" command at startup newsgroup
  1116. X''' selection.
  1117. X''' 
  1118. X''' Revision 4.3.2.1  90/11/26  02:12:34  sob
  1119. X''' Added information about environmental variables NEWSRC and NNTPSERVER.
  1120. X''' 
  1121. X''' Revision 4.3.1.10  90/11/06  01:17:29  sob
  1122. X''' Added text about new Y response when adding newsgroups.
  1123. X''' 
  1124. X''' Revision 4.3.1.9  90/05/08  22:05:11  sob
  1125. X''' Added documentation for new -q flag
  1126. X''' 
  1127. X''' Revision 4.3.1.8  90/03/17  17:09:56  sob
  1128. X''' 
  1129. X''' added documentation for MODSTRING and NOPOSTRING.
  1130. X''' 
  1131. X''' Revision 4.3.1.7  89/11/28  00:28:10  sob
  1132. X''' Changed some usages of "say" and "saying" to "type" and "typing"
  1133. X''' 
  1134. X''' Revision 4.3.2.1  89/11/26  19:00:39  sob
  1135. X''' Added modifications to reflect reality.
  1136. X''' 
  1137. X''' Revision 4.3.1.5  85/09/10  11:05:55  lwall
  1138. X''' Improved %m in in_char().
  1139. X''' 
  1140. X''' Revision 4.3.1.4  85/07/23  18:26:40  lwall
  1141. X''' Added MAILCALL.
  1142. X''' 
  1143. X''' Revision 4.3.1.3  85/05/23  17:14:14  lwall
  1144. X''' Now allows 'r' and 'f' on null articles.
  1145. X''' 
  1146. X''' Revision 4.3.1.2  85/05/13  09:27:53  lwall
  1147. X''' Added CUSTOMLINES option.
  1148. X''' 
  1149. X''' Revision 4.3.1.1  85/05/10  11:38:22  lwall
  1150. X''' Branch for patches.
  1151. X''' 
  1152. X''' Revision 4.3  85/05/01  11:48:26  lwall
  1153. X''' Baseline for release with 4.3bsd.
  1154. X''' 
  1155. X''' 
  1156. X.de Sh
  1157. X.br
  1158. X.ne 5
  1159. X.PP
  1160. X\fB\\$1\fR
  1161. X.PP
  1162. X..
  1163. X.de Sp
  1164. X.if t .sp .5v
  1165. X.if n .sp
  1166. X..
  1167. X.de Ip
  1168. X.br
  1169. X.ie \\n.$>=3 .ne \\$3
  1170. X.el .ne 3
  1171. X.IP "\\$1" \\$2
  1172. X..
  1173. X'''
  1174. X'''     Set up \*(-- to give an unbreakable dash;
  1175. X'''     string Tr holds user defined translation string.
  1176. X'''     Bell System Logo is used as a dummy character.
  1177. X'''
  1178. X.tr \(bs-|\(bv\*(Tr
  1179. X.ie n \{\
  1180. X.ds -- \(bs-
  1181. X.if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
  1182. X.if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
  1183. X.ds L" ""
  1184. X.ds R" ""
  1185. X.ds L' '
  1186. X.ds R' '
  1187. X'br\}
  1188. X.el\{\
  1189. X.ds -- \(em\|
  1190. X.tr \*(Tr
  1191. X.ds L" ``
  1192. X.ds R" ''
  1193. X.ds L' `
  1194. X.ds R' '
  1195. X'br\}
  1196. X.TH TRN 1 LOCAL
  1197. X.UC 6
  1198. X.SH NAME
  1199. Xtrn - threaded read news program
  1200. X.SH SYNOPSIS
  1201. X.B trn [options] [newsgroups]
  1202. X.SH DESCRIPTION
  1203. X.I Trn
  1204. Xis a threaded version of
  1205. X.I rn,
  1206. Xwhich is a replacement for the readnews(1) program.
  1207. XBeing \*(L"threaded\*(R" means that the articles are interconnected
  1208. Xin reply order.
  1209. XEach discussion thread is a tree of articles, where all the
  1210. Xreply (child) articles branch off from their respective originating
  1211. X(parent) articles.
  1212. XA representation of this tree (or a portion of it) is displayed in the
  1213. Xarticle header as you are reading news.
  1214. XThis gives you a better feel for how all the articles are related, and
  1215. Xeven lets you see at a glance when an article already has a plethora of
  1216. Xreplies (to avoid beating a subject to death).
  1217. XIn addition,
  1218. X.I trn
  1219. Xhas a thread selector menu that allows you to quickly browse
  1220. Xthe subjects and authors of the available threads and choose the
  1221. Xones you find interesting.
  1222. XThe remaining threads can either be saved for later or marked as read.
  1223. X.PP
  1224. XIf you are already familiar with
  1225. X.I rn
  1226. Xyou will probably want to skip forward to the section on the
  1227. X.IR "Thread Selection Mode" ,
  1228. Xthen move on to read about the
  1229. X.IR "Tree Display" ,
  1230. Xand finish with the summary of
  1231. X.IR "What's New" ?
  1232. Xwith
  1233. X.IR trn .
  1234. XIf you're impatient, just dive in and get started.
  1235. XAll the regular commands are the same as those in
  1236. X.IR rn ,
  1237. Xand the on-line help will give you a quick run-down of what new commands are
  1238. Xavailable.
  1239. XJust type \*(L'h\*(R' from any prompt.
  1240. XI'd suggest using the command:
  1241. X.Sp
  1242. X    trn \-x \-X
  1243. X.Sp
  1244. Xto make sure some of the best new features are turned on.
  1245. X.Sh "Starting Trn"
  1246. XIf no newsgroups are specified, all the newsgroups which have unread news
  1247. Xare displayed, and then the user is asked for each one whether he wants to
  1248. Xread it, in the order in which the newsgroups occur in the
  1249. X.I .newsrc
  1250. Xfile.
  1251. XWith a list of newsgroups,
  1252. X.I trn
  1253. Xwill start up in \*(L"add\*(R" mode, using the list as a set of patterns to
  1254. Xadd new newsgroups and restrict which newsgroups are displayed.
  1255. XSee the discussion of the \*(L'a\*(R' command on the newsgroup selection
  1256. Xlevel.
  1257. X.PP
  1258. X.I Trn
  1259. Xoperates on four levels: the newsgroup selection level, the thread
  1260. Xselection level, the article selection level, and the paging level.
  1261. XEach level has its own set of commands, and its own help menu.
  1262. XAt the paging level (the bottom level),
  1263. X.I trn
  1264. Xbehaves much like the
  1265. X.IR more (1)
  1266. Xprogram.
  1267. XAt the thread selection level, you are presented with the subjects and
  1268. X(optionally) authors associated with each discussion thread, and given
  1269. Xa chance to choose which ones you wish to read now, save for later, or
  1270. Xmanipulate in some way.
  1271. XAt the article selection level, you may read them in the default order
  1272. X(which follows the discussion of the articles and their replies), or jump
  1273. Xaround from one article to another.
  1274. XAt the newsgroup selection level (the top level), you may specify which
  1275. Xnewsgroup you want next, or read them in the default order, which is the
  1276. Xorder that the newsgroups occur in your
  1277. X.I .newsrc
  1278. Xfile.
  1279. X(You will therefore want to rearrange your
  1280. X.I .newsrc
  1281. Xfile to put the most interesting newsgroups first.
  1282. XThis can be done with the \*(L'm\*(R' command on the Newsgroup Selection level.
  1283. XWARNING: invoking readnews/vnews (the old user interface) in any way (including
  1284. Xas a news checker in your login sequence!) will cause your
  1285. X.I .newsrc
  1286. Xto be disarranged again.)
  1287. X.PP
  1288. XNote:  your news administrator has the option of turning thread processing
  1289. Xoff for individual groups, and thus it is possible for some groups to not
  1290. Xhave any thread information available for
  1291. X.I trn
  1292. Xto use.
  1293. XWhen this happens the group will be displayed in the traditional
  1294. X.I rn
  1295. Xfashion\*(--articles arranged in arrival order with optional subject
  1296. Xsearching and no thread selector.
  1297. X.PP
  1298. XOn any level, at ANY prompt, help is available in the form of a summary of
  1299. Xavailable commands and what they do by typing an \*(L'h\*(R'.
  1300. XThis is probably the most important command to remember, so don't you
  1301. Xforget it.
  1302. X.PP
  1303. XTyping space to any question means to do the normal thing.
  1304. XYou will know what that is because
  1305. Xevery prompt has a list of several plausible commands enclosed in
  1306. Xsquare brackets.
  1307. XThe first command in the list is the one which will be done if you type
  1308. Xa space.
  1309. X(All input is done in cbreak mode, so carriage returns should not be typed
  1310. Xto terminate anything except certain multi-character commands.
  1311. XThose commands will be obvious in the discussion below because they take an
  1312. Xargument.)
  1313. X.PP
  1314. XUpon startup,
  1315. X.I trn
  1316. Xwill do several things:
  1317. X.Ip 1. 4
  1318. XIt will look for your
  1319. X.I .newsrc
  1320. Xfile, which is your list of subscribed-to
  1321. Xnewsgroups.
  1322. XIf
  1323. X.I trn
  1324. Xdoesn't find a
  1325. X.IR .newsrc ,
  1326. Xit will create one.
  1327. XIf it does find one, it will back it up under the name \*(L".oldnewsrc\*(R".
  1328. X.Ip 2. 4
  1329. XIt will input your
  1330. X.I .newsrc
  1331. Xfile, listing out the first several newsgroups
  1332. Xwith unread news.
  1333. X.Ip 3. 4
  1334. XIt will perform certain consistency checks on your
  1335. X.IR .newsrc .
  1336. XIf your
  1337. X.I .newsrc
  1338. Xis out of date in any of several ways,
  1339. X.I trn
  1340. Xwill warn you and patch it up for you, but you may have to wait a little
  1341. Xlonger for it to start up.
  1342. X.Ip 4. 4
  1343. X.I Trn
  1344. Xwill next check to see if any new newsgroups have been created, and give
  1345. Xyou the opportunity to add them to your
  1346. X.IR .newsrc .
  1347. X.Ip 5. 4
  1348. X.I Trn
  1349. Xgoes into the top prompt level\*(--the newsgroup selection level.
  1350. X.Sh "Newsgroup Selection Level"
  1351. XIn this section the words \*(L"next\*(R" and \*(L"previous\*(R" refer to
  1352. Xthe ordering of the newsgroups in your
  1353. X.I .newsrc
  1354. Xfile.
  1355. XOn the newsgroup selection level, the prompt looks like this:
  1356. X.Sp
  1357. X******** 17 unread articles in talk.blurfl\*(--read now? [ynq]
  1358. X.Sp
  1359. Xand the following commands may be given at this level:
  1360. X.Ip y,SP 8
  1361. XDo this newsgroup now.
  1362. X.Ip .command 8
  1363. XDo this newsgroup now, but execute
  1364. X.I command
  1365. Xbefore displaying anything.
  1366. XThe command will be interpreted as if given on the article selection level.
  1367. X.Ip \+ 8
  1368. XEnter this newsgroup through the thread selector.
  1369. X.Ip = 8
  1370. XStart this newsgroup, but list subjects before displaying articles.
  1371. X.Ip U 8
  1372. XEnter this newsgroup through the \*(L"Set unread\*(R" prompt.
  1373. X.Ip n 8
  1374. XGo to the next newsgroup with unread news.
  1375. X.Ip N 8
  1376. XGo to the next newsgroup.
  1377. X.Ip p 8
  1378. XGo to the previous newsgroup with unread news.
  1379. XIf there is none, stay at the current newsgroup.
  1380. X.Ip P 8
  1381. XGo to the previous newsgroup.
  1382. X.Ip \- 8
  1383. XGo to the previously displayed newsgroup (regardless of whether it is
  1384. Xbefore or after the current one in the list).
  1385. X.Ip 1 8
  1386. XGo to the first newsgroup.
  1387. X.Ip ^ 8
  1388. XGo to the first newsgroup with unread news.
  1389. X.Ip $ 8
  1390. XGo to the end of the newsgroups list.
  1391. X.Ip "g newsgroup" 8
  1392. XGo to
  1393. X.IR newsgroup .
  1394. XIf it isn't currently subscribed to, you will be asked if you want to
  1395. Xsubscribe.
  1396. X.Ip "/pattern" 8
  1397. XScan forward for a newsgroup matching
  1398. X.IR pattern .
  1399. XPatterns do globbing like filenames, i.e., use ? to match a single
  1400. Xcharacter, * to match any sequence of characters, and [] to specify a list
  1401. Xof characters to match.
  1402. X(\*(L"all\*(R" may be used as a synonym for \*(L"*\*(R".)
  1403. XUnlike normal filename globbing, newsgroup searching is not anchored to
  1404. Xthe front and back of the filename, i.e. \*(L"/ski\*(R" will find
  1405. Xrec.skiing.
  1406. XYou may use ^ or $ to anchor the front or back of the search:
  1407. X\*(L"/^test$\*(R" will find newsgroup test and nothing else
  1408. XIf you want to include newsgroups with 0 unread articles, append /r.
  1409. XIf the newsgroup is not found between the current newsgroup and the last
  1410. Xnewsgroup, the search will wrap around to the beginning.
  1411. X.Ip "?pattern" 8
  1412. XSame as /, but search backwards.
  1413. X.Ip u 8
  1414. XUnsubscribe from the current newsgroup.
  1415. X.Ip "l string" 8
  1416. XList newsgroups not subscribed to which contain the string specified.
  1417. X.Ip L 8 13v
  1418. XLists the current state of the
  1419. X.IR .newsrc ,
  1420. Xalong with status information.
  1421. X.Sp
  1422. X.nf
  1423. X    \h'|0.5i'Status    \h'|2i'Meaning
  1424. X    \h'|0.5i'<number>  \h'|2i'Count of unread articles in newsgroup.
  1425. X    \h'|0.5i'READ      \h'|2i'No unread articles in newsgroup.
  1426. X    \h'|0.5i'UNSUB     \h'|2i'Unsubscribed newsgroup.
  1427. X    \h'|0.5i'BOGUS     \h'|2i'Bogus newsgroup.
  1428. X    \h'|0.5i'JUNK      \h'|2i'Ignored line in .newsrc
  1429. X\h'|2i'(e.g. readnews \*(L"options\*(R" line).
  1430. X.fi
  1431. X.Sp
  1432. X(A bogus newsgroup is one that is not in the list of active newsgroups
  1433. Xin the active file, which on most systems is /usr/lib/news/active unless
  1434. Xyou use NNTP.)
  1435. X.Ip "m name" 8
  1436. XMove the named newsgroup somewhere else in the
  1437. X.IR .newsrc .
  1438. XIf no name is given, the current newsgroup is moved.
  1439. XThere are a number of ways to specify where you want the newsgroup\*(--type
  1440. Xh for help when it asks where you want to put it.
  1441. X.Ip c 8
  1442. XCatch up\*(--mark all unread articles in this newsgroup as read.
  1443. X.Ip "o pattern" 8
  1444. XOnly display those newsgroups whose name matches
  1445. X.IR pattern .
  1446. XPatterns are the same as for the \*(L'/\*(R' command.
  1447. XMultiple patterns may be separated by spaces, just as on the
  1448. Xcommand line.
  1449. XThe restriction will remain in effect either until there are no articles
  1450. Xleft in the restricted set of newsgroups, or another restriction command
  1451. Xis given.
  1452. XSince
  1453. X.I pattern
  1454. Xis optional, \*(L'o\*(R' by itself will remove the
  1455. Xrestriction.
  1456. X.Ip "a pattern" 8
  1457. XAdd new newsgroups matching
  1458. X.IR pattern .
  1459. XNewsgroups which are already in your
  1460. X.I .newsrc
  1461. Xfile, whether subscribed to or
  1462. Xnot, will not be listed.
  1463. XIf any new newsgroups are found, you will be asked for each one whether
  1464. Xyou would like to add it. If you want to add all new newsgroups, you can
  1465. Xtype \*(L'Y\*(R' and they will be added the the end of the
  1466. X.I .newsrc
  1467. Xfile and as groups you want to read. If you don't want to subscribe, all
  1468. Xthe new groups can be added by typing  \*(L'N\*(R'.
  1469. XAfter any new newsgroups have been added, the \*(L'a\*(R' command also
  1470. Xrestricts the current set of newsgroups just like the \*(L'o\*(R' command
  1471. Xdoes.
  1472. X.Ip & 8
  1473. XPrint out the current status of command line switches and any newsgroup
  1474. Xrestrictions.
  1475. X.Ip "&switch {switch}" 8
  1476. XSet additional command line switches.
  1477. X.Ip && 8
  1478. XPrint out the current macro definitions.
  1479. X.Ip "&&keys commands" 8
  1480. XDefine additional macros.
  1481. X.Ip !command 8
  1482. XEscape to a subshell.
  1483. XOne exclamation mark (!) leaves you in your own news directory.
  1484. XA double exclamation mark (!!) leaves you in the spool
  1485. Xdirectory for news, which on most systems is /usr/spool/news that don't use NNTP.
  1486. XThe environment variable SHELL will be used if defined.
  1487. XIf
  1488. X.I command
  1489. Xis null, an interactive shell is started.
  1490. X.Ip q 8
  1491. XQuit.
  1492. X.Ip x 8
  1493. XQuit, restoring .newsrc to its state at startup of
  1494. X.IR trn .
  1495. XThe .newsrc you would have had if you had exited with \*(L'q\*(R' will be
  1496. Xcalled .newnewsrc, in case you didn't really want to type \*(L'x\*(R'.
  1497. X.Ip ^K 8
  1498. XEdit the global KILL file.
  1499. XThis is a file which contains /pattern/j commands (one per line) to be
  1500. Xapplied to every newsgroup as it is started up, that is, when it is
  1501. Xselected on the newsgroup selection level.
  1502. XThe purpose of a KILL file is to mark articles as read on the basis of some
  1503. Xset of patterns.
  1504. XThis saves considerable wear and tear on your \*(L'n\*(R' key.
  1505. XThere is also a local KILL file for each newsgroup.
  1506. XBecause of the overhead involved in searching for articles to kill, it is
  1507. Xbetter if possible to use a local KILL file.
  1508. XLocal KILL files are edited with a \*(L'^K\*(R' on the article selection level.
  1509. XThere are also automatic ways of adding search commands to the local KILL
  1510. Xfile\*(--see the \*(L'K\*(R' and \*(L'T\*(R' commands, and the K search
  1511. Xmodifier on the article selection level.
  1512. X.Sp
  1513. XIf either of the environment variables VISUAL or EDITOR is set, the
  1514. Xspecified editor will be invoked; otherwise a default editor (normally vi(1))
  1515. Xis invoked on the KILL file.
  1516. X.Sh "Thread Selection Level"
  1517. XMost people who don't have all day to read news will want to enter a newsgroup
  1518. Xby way of the thread selector.
  1519. XThis is accomplished by using the \*(L'+\*(R'
  1520. Xcommand at the newsgroup selection level.
  1521. XIn fact, this may be the default command for entering a newsgroup, depending
  1522. Xon how your version of
  1523. X.I trn
  1524. Xwas configured (see the
  1525. X.B \-X
  1526. Xoption for how to turn this default on or off).
  1527. XThe thread selector displays a list of article subjects and (optionally)
  1528. Xauthors grouped into threads.
  1529. XA thread may contain multiple subjects if the subject changes as the
  1530. Xdiscussion continues.
  1531. XAlso displayed is a count of the number of unread articles in each thread.
  1532. XEach thread is preceded by a letter from \*(L'a\*(R' to \*(L'z\*(R'
  1533. X(skipping \*(L'q\*(R') which is typed to select the associated thread.
  1534. XWhen selected, the thread's letter will be flagged with a \*(L'+\*(R'.
  1535. X.Sp
  1536. XThe default is to display the long mode of the thread selector.
  1537. XIn this mode, all the authors of the articles in the thread are summarized,
  1538. Xone per line (authors of multiple articles are listed only once).
  1539. XThe medium display mode groups multiple authors onto the same line, so that
  1540. Xmore threads can be displayed at one time.
  1541. XThe short display mode does not display any author names, and can display
  1542. Xmore characters in the subject.
  1543. X.PP
  1544. XThe following commands are available in the thread selector:
  1545. X.Ip "a-z,0-9" 8
  1546. XSelect the discussion thread by its letter or number;
  1547. Xpress again to deselect.
  1548. XBy default the letters h, k, n, p, q, and y are omitted to allow them
  1549. Xto be typed as commands.
  1550. XSee the variable SELECTCHARS customize this.
  1551. X.Ip SP 8
  1552. XPerform the default command.
  1553. XThis is usually > for most pages, and Z on the last page (although K and X
  1554. Xare also quite popular).
  1555. X.Ip CR 8
  1556. XRead the current thread (if none are selected) or all the selected threads.
  1557. X.Ip "Z,TAB" 8
  1558. XBegin reading the selected threads.
  1559. XIf none are are selected, read everything.
  1560. X.Ip "y, \*(L'.\*(R'" 8
  1561. XToggle the current thread's selection (the one under the cursor).
  1562. X.Ip "k, \*(L',\*(R'" 8
  1563. XMark the current thread as killed.
  1564. X.Ip "m, \e" 8
  1565. XUnmark the current thread.
  1566. X.Ip \- 8
  1567. XSet a range, as in 2 \- 5.
  1568. XRepeats the last marking action:  selected, unselected, killed, or unmarked.
  1569. X.Ip @ 8
  1570. XToggle all visible article selections.
  1571. X.Ip < 8
  1572. XGo to previous page.
  1573. X.Ip > 8
  1574. XGo to next page.
  1575. X.Ip "p, [" 8
  1576. XMove up to the previous thread.
  1577. X.Ip "n, ]" 8
  1578. XMove down to the next thread.
  1579. X.Ip ^ 8
  1580. XGo to first page.
  1581. X.Ip $ 8
  1582. XGo to last page.
  1583. X.Ip X 8
  1584. XMark all unselected articles as read and start reading.
  1585. X.Ip J 8
  1586. XMark all selected articles as read (useful after performing some action
  1587. Xon them with the \*(L':\*(R' command).
  1588. X.Ip D 8
  1589. XMark unselected articles on the current page as read.
  1590. XBegin reading if articles are selected, otherwise go to the next page.
  1591. X.Ip ^K 8
  1592. XEdit the local KILL file for this newsgroup.
  1593. XA detailed description of KILL files is found in the Article Selection section.
  1594. X.Ip ":command" 8
  1595. XExecute a command upon all the selected threads and their articles.
  1596. XIf no threads are selected, all threads with unread articles are affected.
  1597. X.Sp
  1598. XApplicable commands include \*(L'+\*(R' and \*(L'-\*(R' (select and unselect
  1599. Xthread), \*(L'T\*(R' (trash the thread into the local KILL file), \*(L't\*(R'
  1600. X(display article tree), \*(L"s dest\*(R" (save article to a destination),
  1601. X\*(L"e dir\*(R" (extract to directory), \*(L'E\*(R' (end partial uudecode),
  1602. Xas well as: S, |, w, W, m, M, j, and =.
  1603. X.Ip "/pattern" 8
  1604. XScan all articles for a subject containing
  1605. X.I pattern
  1606. Xand select its thread.
  1607. X.Ip "/pattern/modifiers:command{:command}" 8
  1608. XApply the commands listed to articles matching the search command (possibly
  1609. Xwith h, a, r, or K modifiers).
  1610. XThe default action, if no command is specified, is to select the parent
  1611. Xthread of the matching article (the \*(L'+\*(R' command).
  1612. XSee the section on Regular Expressions, and the description of pattern
  1613. Xsearching in the Article Selection section.
  1614. X.Sp
  1615. XOne example:  to scan all the unread articles looking for \*(L"topic\*(L"
  1616. Xanywhere in the article and then select its thread and save the article to
  1617. Xthe files topic.1, topic.2, etc. use \*(L"/topic/a:+:s topic.%#\*(R".
  1618. X.Ip N 8
  1619. XLeave this group as-is and go on to the next newsgroup prompt.
  1620. X.Ip U 8
  1621. XSwitch between selecting read/unread articles.
  1622. X.Ip L 8
  1623. XSwitch the current display mode between the long and medium modes
  1624. X(with authors) and the short mode.
  1625. X(See the
  1626. X.B \-x
  1627. Xoption to select your favorite mode as the default.)
  1628. X.Ip & 8
  1629. XDisplay or set the current status of command line switches.
  1630. X.Ip && 8
  1631. XDisplay or set the current macro definitions.
  1632. X.Ip !command 8
  1633. XEscape to a subshell.
  1634. X.Ip "q,ESC" 8
  1635. XQuit selection mode.
  1636. X.Ip Q 8
  1637. XQuit the current newsgroup and return to the newsgroup selection prompt
  1638. Xfor this group.
  1639. X.Sh "Article Selection Level"
  1640. XOn the article selection level,
  1641. X.I trn
  1642. Xdisplays unread articles in thread sequence, reading each article and its
  1643. Xreplies before going on to another topic.
  1644. XIf threads are disabled for a particular group, the default order is
  1645. Xin numeric sequence (the order they arrived at your site) unless you
  1646. Xuse subject search (^N) to change the default order to be
  1647. Xnumerical order within each matching subject.
  1648. X(The
  1649. X.B \-S
  1650. Xswitch can be used to make subject search mode the default for unthreaded
  1651. Xgroups.)
  1652. X.Sp
  1653. XOn the article selection level you are
  1654. X.I not
  1655. Xasked whether you want to read an article before the article is displayed;
  1656. Xrather,
  1657. X.I trn
  1658. Xsimply displays the first page (or portion of a page, at low baud rates) of the
  1659. Xarticle and asks if you want to continue.
  1660. XThe normal article selection prompt comes at the END of the article
  1661. X(though article selection commands can be given from within the middle
  1662. Xof the article (the pager level) also).
  1663. XThe prompt at the end of an article looks like this:
  1664. X.Sp 
  1665. XEnd of article 248 (of 257)\*(--what next? [npq]
  1666. X.Sp
  1667. XThe following are the options at this point:
  1668. X.Ip n,SP 8
  1669. XScan forward for next unread article.
  1670. X(Note: the \*(L'n\*(R' (next) command when typed at the end of an article
  1671. Xdoes not mark the article as read, since an article is automaticaly marked
  1672. Xas read after the last line of it is printed.
  1673. XIt is therefore possible to type a sequence such as \*(L'mn\*(R' and leave
  1674. Xthe article marked as unread.
  1675. XThe fact that an article is marked as read by typing n, N, ^N, e, s, S, |,
  1676. Xw, or W within the MIDDLE of the article is in fact a special case.)
  1677. X.Ip N 8
  1678. XGo to the next article.
  1679. X.Ip ^N 8
  1680. XScan forward for the next article with the same subject.
  1681. XIf the group is unthreaded this also makes subject search mode (^N)
  1682. Xthe default.
  1683. X.Ip p 8
  1684. XScan backward for previous unread article.
  1685. XIf there is none, stay at the current article.
  1686. X.Ip P 8
  1687. XGo to the previous article.
  1688. X.Ip \- 8
  1689. XGo to the previously displayed article (regardless of whether that article
  1690. Xis before or after this article in the normal sequence).
  1691. X.Ip ^P 8
  1692. XScan backward for the previous article with the same subject.
  1693. XMakes subject search mode (^N) the default if the group is unthreaded.
  1694. X.Ip "<,>" 8
  1695. XBrowse the previous/next selected thread.
  1696. XIf no selections have been made, all the threads that had unread news when
  1697. Xyou entered the newsgroup (or last left the thread selector) are treated
  1698. Xas selected.
  1699. XEntering an empty newsgroup makes all the already-read threads available
  1700. Xfor browsing.
  1701. X.Ip "[,]" 8
  1702. XProceed to the left/right in the article tree.
  1703. XVisits already-read articles as well as empty nodes.
  1704. XIf you attempt to go past the left/right edge of the tree, you are advanced
  1705. Xto the previous/next line if available.
  1706. X.Ip "{,}" 8
  1707. XGo to the root/leaf of the article tree, even if the node is
  1708. Xalready read or empty.
  1709. XProceeds to the very first/last node if you're already at a root/leaf in
  1710. Xa multi-root thread.
  1711. X.Ip t 8
  1712. XDisplay the entire article tree and all its associated subjects.
  1713. X.Ip ^R 8
  1714. XRestart the current article.
  1715. X.Ip v 8
  1716. XRestart the current article verbosely, displaying the entire header.
  1717. X.Ip ^L 8
  1718. XRefresh the screen.
  1719. X.Ip ^X 8
  1720. XRestart the current article, and decrypt as a rot13 message.
  1721. X.Ip X 8
  1722. XRefresh the screen, and decrypt as a rot13 message.
  1723. X.Ip b 8
  1724. XBack up one page.
  1725. X.Ip q 8
  1726. XQuit this newsgroup and go back to the newsgroup selection level.
  1727. X.Ip ^ 8
  1728. XGo to the first unread article.
  1729. X.Ip $ 8
  1730. XGo to the last article (actually, one past the last article).
  1731. X.Ip "number" 8
  1732. XGo to the numbered article.
  1733. X.Ip "range{,range}:command{:command}" 8
  1734. XApply a set of commands to a set of articles.
  1735. XA range consists of either <article number> or
  1736. X<article\ number>\-<article\ number>.
  1737. XA dot \*(L'.\*(R' represents the current article, and a dollar
  1738. Xsign \*(L'$\*(R' represents the last article.
  1739. X.Sp
  1740. XApplicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
  1741. X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
  1742. X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
  1743. X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
  1744. X\&\*(L'T\*(R' (trash the thread into the local KILL file), \*(L'+\*(R'
  1745. X(select the thread), \*(L'-\*(R' (deselect the thread), \*(L'C\*(R'
  1746. X(cancel), as well as S, |, w, W, and t.
  1747. X.Ip ":command" 8
  1748. XApply a command to all selected threads and their articles.
  1749. XIf no threads are selected, apply the command to all the unread threads.
  1750. XFor applicable commands, see the discussion above for the range command.
  1751. X.Ip j 8
  1752. XJunk the current article\*(--mark it as read.
  1753. XIf this command is used from within an article, you are left at the end of
  1754. Xthe article, unlike \*(L'n\*(R', which looks for the next article.
  1755. X.Ip m 8
  1756. XMark the current article as still unread.
  1757. X(If you are in subject search mode you probably want to use M instead of m.
  1758. XOtherwise the current article may be selected as the beginning of the next
  1759. Xsubject thread.)
  1760. X.Ip M 8
  1761. XMark the current article as still unread, but not until the newsgroup
  1762. Xis exited.
  1763. XUntil then, the current article will be marked as read.
  1764. XThis is useful for returning to an article in another session, or in another
  1765. Xnewsgroup.
  1766. X.Ip /pattern 8
  1767. XScan forward for article containing
  1768. X.I pattern
  1769. Xin the subject.
  1770. XSee the section on Regular Expressions.
  1771. XTogether with the escape substitution facility described later, it becomes
  1772. Xeasy to search for various attributes of the current article, such as
  1773. Xsubject, article ID, author name, etc.
  1774. XThe previous pattern can be recalled with \*(L"<esc>/\*(R".
  1775. XIf
  1776. X.I pattern
  1777. Xis omitted, the previous pattern is assumed.
  1778. X.Ip /pattern/h 8
  1779. XScan forward for article containing
  1780. X.I pattern
  1781. Xin the header.
  1782. X.Ip /pattern/a 8
  1783. XScan forward for article containing
  1784. X.I pattern
  1785. Xanywhere in article.
  1786. X.Ip /pattern/r 8
  1787. XScan read articles also.
  1788. X.Ip /pattern/c 8
  1789. XMake search case sensitive.
  1790. XOrdinarily upper- and lower-case are considered the same.
  1791. X.Ip "/pattern/modifiers:command{:command}" 8
  1792. XApply the commands listed to articles matching the search command (possibly
  1793. Xwith h, a, or r modifiers).
  1794. XApplicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
  1795. X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
  1796. X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
  1797. X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
  1798. X\&\*(L'T\*(R' (trash the associated thread and put it in the local KILL
  1799. Xfile), \*(L'+\*(R' (select the associated thread), \*(L'-\*(R' deselect
  1800. Xthe associated thread), and \*(L'C\*(R' (cancel).
  1801. XIf the first command is \*(L'm\*(R' or \*(L'M\*(R', modifier r is assumed.
  1802. XA K may be included in the modifiers (not the commands) to cause the
  1803. Xentire command (sans K) to be saved to the local KILL file, where it will
  1804. Xbe applied to every article that shows up in the newsgroup.
  1805. X.Sp
  1806. XFor example, to save all articles in a given newsgroup to the line printer
  1807. Xand mark them read, use \*(L"/^/\||\|lpr:j\*(R".
  1808. XIf you type \*(L"/^/K\||\|lpr:j\*(R", this will happen every time you enter the
  1809. Xnewsgroup.
  1810. X.Ip ?pattern 8
  1811. XScan backward for article containing
  1812. X.I pattern
  1813. Xin the subject.
  1814. XMay be modified as the forward search is: ?pattern?modifiers[:commands].
  1815. XIt is likely that you will want an r modifier when scanning backward.
  1816. X.Ip k 8
  1817. XMark as read all articles with the same subject as the current article.
  1818. X(Note: there is no single character command to temporarily mark as read (M
  1819. Xcommand) articles matching the current subject.
  1820. XThat can be done with \*(L"/<esc>s/M\*(R", however.)
  1821. X.Ip \, 8
  1822. XMark the current article and all its replies as read.
  1823. X.Ip J 8
  1824. XJunk all the articles in the thread, even if it contains multiple subjects.
  1825. X.Ip K 8
  1826. XDo the same as the k command, but also add a line to the local KILL file for
  1827. Xthis newsgroup to kill this subject every time the newsgroup is started up.
  1828. XFor a discussion of KILL files, see the \*(L'^K\*(R' command below.
  1829. XSee also the K modifier on searches above.
  1830. X.Ip T 8
  1831. XKill the current thread, and also add a line to the local KILL file for
  1832. Xthis newsgroup to kill new articles attached to this thread every time the
  1833. Xnewsgroup is started up.
  1834. X.Ip ^K 8
  1835. XEdit the local KILL file for this newsgroup.
  1836. XEach line of the KILL file should be a subject-killing command of the
  1837. Xform /pattern/j or a thread killing command of the form T<number>.
  1838. XThe thread killing commands are usually followed by a comment to let
  1839. Xyou know the primary subject of the numbered thread being killed.
  1840. XThe first line in the KILL file has the form \*(L"THRU <number>\*(R",
  1841. Xwhich tells
  1842. X.I trn
  1843. Xthe maximum article number that the KILL file has been applied to.
  1844. X(You may delete the THRU line to force a rescan of current articles.)
  1845. XYou may also have reason to use the m, h, or a modifiers.
  1846. XBe careful with the M modifier in a kill file\*(--there are more efficient
  1847. Xways to never read an article.
  1848. XYou might have reason to use it if a particular series of articles is posted
  1849. Xto multiple newsgroups.
  1850. XIn this case, M would force you to view the article in a different newsgroup.
  1851. X.Sp
  1852. XTo see only newgroup articles in the control newsgroup, for instance, you
  1853. Xmight put
  1854. X.Sp
  1855. X/^/j
  1856. X.br
  1857. X/newgroup/m
  1858. X.Sp
  1859. Xwhich kills all subjects not containing \*(L"newgroup\*(R".
  1860. XYou can add lines automatically via the K command and K search modifiers,
  1861. Xbut editing is the only way to remove lines.
  1862. XIf either of the environment variables VISUAL or EDITOR is set, the
  1863. Xspecified editor will be invoked; otherwise a default editor (normally vi)
  1864. Xis invoked on the KILL file.
  1865. X.Sp
  1866. XThe KILL file may also contain switch setting lines beginning with \*(L'&\*(R'.
  1867. XAdditionally, any line beginning with \*(L'X\*(R' is executed on exit
  1868. Xfrom the newsgroup rather than on entrance.
  1869. XThis can be used to set switches back to a default value.
  1870. XOne use for this capability is to set your save directory to a custom value
  1871. Xupon entry to a newsgroup and set it back on exit using the \-ESAVEDIR option.
  1872. XSee also the
  1873. X.B \-/
  1874. Xoption for another solution to multiple save directories without using KILL
  1875. Xfiles.
  1876. X.Ip r 8
  1877. XReply through net mail.
  1878. XThe environment variables MAILPOSTER and MAILHEADER may be used to modify
  1879. Xthe mailing behavior of
  1880. X.I trn
  1881. X(see environment section).
  1882. XIf on a nonexistent article such as the "End of newsgroup" pseudo-article
  1883. X(which you can get to with a \*(L'$\*(R' command), invokes the mailer to
  1884. Xnobody in particular.
  1885. X.Ip R 8
  1886. XReply, including the current article in the header file generated.
  1887. X(See \*(L'F\*(R' command below).
  1888. XThe YOUSAID environment variable controls the format of the attribution line.
  1889. X.Ip f 8
  1890. XSubmit a followup article.
  1891. XIf on a nonexistent article such as the "End of newsgroup" pseudo-article
  1892. X(which you can get to with a \*(L'$\*(R' command), posts an original
  1893. Xarticle (basenote).
  1894. X.Ip F 8
  1895. XSubmit a followup article, and include the old article, with lines prefixed
  1896. Xeither by \*(L">\*(R" or by the argument to a
  1897. X.B \-F
  1898. Xswitch.
  1899. X.I Trn
  1900. Xwill attempt to provide an attribution line in front of the quoted article,
  1901. Xgenerated from the From: line of the article.
  1902. XUnfortunately, the From: line doesn't always contain the right name; you
  1903. Xshould double check it against the signature and change it if necessary,
  1904. Xor you may have to apologize for quoting the wrong person.
  1905. XThe environment variables NEWSPOSTER, NEWSHEADER and ATTRIBUTION may be
  1906. Xused to modify the posting behavior of
  1907. X.I trn
  1908. X(see environment section).
  1909. X.Sp
  1910. XIf you are starting a new subject, move to the end of the newsgroup
  1911. Xwith the \*(L'$\*(R' command before pressing \*(L'f\*(R'.
  1912. XOtherwise you may have to do a lot of header editing, including 
  1913. X.I "removing the References line"
  1914. X-- this is IMPORTANT to remember ONLY when starting a new subject.
  1915. XIt is much simpler to remember \*(L"$f\*(R" for new subjects, and to
  1916. Xallways leave the References line alone.
  1917. X.Ip C 8
  1918. XCancel the current article, but only if you are the contributor or superuser.
  1919. X.Ip c 8
  1920. XCatch up in this newsgroup; i.e., mark all articles as read.
  1921. X.Ip U 8
  1922. XMark some or all articles as unread.
  1923. XYou can choose to mark the current thread, sub-thread (the current article
  1924. Xand its replies), all the articles, or start up the thread selector
  1925. Xto choose specific threads to set unread.
  1926. X.Ip u 8
  1927. XUnsubscribe from this newsgroup.
  1928. X.Ip "s destination" 8
  1929. XSave to a filename or pipe using sh.
  1930. XIf the first character of the destination is a vertical bar, the rest of
  1931. Xthe command is considered a shell command to which the article is passed
  1932. Xthrough standard input.
  1933. XThe command is subject to filename expansion.
  1934. X(See also the environment variable PIPESAVER.)
  1935. XIf the destination does not begin with a vertical bar, the rest of the
  1936. Xcommand is assumed to be a filename of some sort.
  1937. XAn initial tilde \*(L'~\*(R' will be translated to the name of the home
  1938. Xdirectory, and an initial environment variable substitution is also allowed.
  1939. XIf only a directory name is specified, the environment variable SAVENAME
  1940. Xis used to generate the actual name.
  1941. XIf only a filename is specified (i.e. no directory), the environment variable
  1942. XSAVEDIR will be used to generate the actual directory.
  1943. XIf nothing is specified, then obviously both variables will be used.
  1944. XSince the current directory for
  1945. X.I trn
  1946. Xwhile doing a save command is your
  1947. Xprivate news directory, typing \*(L"s ./filename\*(R" will force the file
  1948. Xto your news directory.
  1949. XSave commands are also run through % interpretation, so that you can
  1950. Xenter \*(L"s %O/filename\*(R" to save to the directory you were in when you ran
  1951. X.IR trn ,
  1952. Xand \*(L"s %t\*(R" to save to a filename consisting of the Internet address
  1953. Xof the sender.
  1954. X.Sp
  1955. XAfter generating the full pathname of the file to save to,
  1956. X.I trn
  1957. Xdetermines if the file exists already, and if so, appends to it.
  1958. X.I trn
  1959. Xwill attempt to determine if an existing file is a mailbox or a normal file,
  1960. Xand save the article in the same format.
  1961. XIf the output file does not yet exist,
  1962. X.I trn
  1963. Xwill by default ask you which format you want, or you can make it skip the
  1964. Xquestion with either the
  1965. X.B \-M
  1966. Xor
  1967. X.B \-N
  1968. Xswitch.
  1969. XIf the article is to be saved in mailbox format, the command to do so is
  1970. Xgenerated from the environment variable MBOXSAVER.
  1971. XOtherwise, NORMSAVER is used.
  1972. X.Ip "S destination" 8
  1973. XSave to a filename or pipe using a preferred shell, such as csh.
  1974. XWhich shell is used depends first on what you have the environment variable
  1975. XSHELL set to, and in the absence of that, on what your news administrator
  1976. Xset for the preferred shell when he or she installed
  1977. X.IR trn .
  1978. X.Ip "| command" 8
  1979. XShorthand for \*(L"s | command\*(R".
  1980. X.Ip "w destination" 8
  1981. XThe same as \*(L"s destination\*(R", but saves without the header.
  1982. X.Ip "W destination" 8
  1983. XThe same as \*(L"S destination\*(R", but saves without the header.
  1984. X.Ip "e directory" 8
  1985. XExtract a shell archive or uuencoded binary to the designated directory.
  1986. XThe article is first scanned to try discover what type of data is
  1987. Xencapsulated.
  1988. XIf a \*(L"cut here\*(R" line is found, first non-blank following
  1989. Xline must be either the start of a shar header, or the \*(L"begin\*(R"
  1990. Xor \*(L"table\*(R" line of a uuencoded binary.
  1991. XThe default for extracting shars is to send the data portion of the file
  1992. Xto /bin/sh, but that can be overridden with the UNSHAR variable (see the
  1993. XENVIRONMENT section).
  1994. XUudecoding is done internally by a decoder that can handle the data
  1995. Xbeing split up over multiple articles, and extracted one piece at a time.
  1996. XTo decode a multi-article file, either execute the \*(L'e\*(R'
  1997. Xcommand in each article in sequence (use \*(L"e %m\*(R" to extract to the
  1998. Xsame directory as the last command), use an article range to execute the
  1999. Xcommand, or use the \*(L":e\*(R" command to execute the command on the
  2000. Xcurrently selected articles.
  2001. XIf a uudecoding is in-progress (the last piece wasn't extracted yet)
  2002. Xand you exit the group, the partial file will be removed.
  2003. XThis also occurs if you start to extract a new uuencoded file before the
  2004. Xprevious one was finished.
  2005. XSee also the \*(L'E\*(R' command for ending a multi-part uudecoding
  2006. Xmanually.
  2007. X.Sp
  2008. XThere is one special case that we handle:  if the very first file in a
  2009. Xrecognizable shar file is a uuencoded binary that was packed with lines
  2010. Xstarting with an \*(L'X\*(R', we will not unshar the file but instead
  2011. Xuudecode it.
  2012. XIf this causes problems, you can override the default extraction method
  2013. Xby following the directory with an explicit command to execute, as
  2014. Xdescribed below.
  2015. X.Ip "e directory|command" 8
  2016. XThis form of the \*(L'e\*(R' command allows you to extract other data
  2017. Xformats than shar or uuencoded files or to override the decisions made
  2018. Xby the automatic extraction selection described above.
  2019. XIn normal operation, all data following what we recognize as
  2020. Xa \*(L"cut here\*(R" line will be send to the specified command.
  2021. XAdditionally, the distinctive beginning of a shell archive is also recognized
  2022. Xwithout a preceding cut line.
  2023. XThe default directory is set to the specified directory, or the value
  2024. Xof SAVEDIR if unspecified.
  2025. XYou can repeat your previous extract command by specifying \*(L"e %b|%e\*R"
  2026. X(or just \*(L"e %b\*(R" if no command was provided).
  2027. X.Ip E 8
  2028. XThis command ends any multi-part uuencoded file extraction that you began,
  2029. Xbut are unable (or unwilling) to complete.
  2030. XThe partially extracted file is removed.
  2031. X.Ip & 8
  2032. XPrint out the current status of command line switches.
  2033. X.Ip "&switch {switch}" 8
  2034. XSet additional command line switches.
  2035. X.Ip && 8
  2036. XPrint out current macro definitions.
  2037. X.Ip "&&keys commands" 8
  2038. XDefine an additional macro.
  2039. X.Ip !command 8
  2040. XEscape to a subshell.
  2041. XOne exclamation mark (!) leaves you in your own news directory.
  2042. XA double exclamation mark (!!) leaves you in the spool
  2043. Xdirectory of the current newsgroup.
  2044. XThe environment variable SHELL will be used if defined.
  2045. XIf
  2046. X.I command
  2047. Xis null, an interactive shell is started.
  2048. X.Sp
  2049. XYou can use escape key substitutions described later to get to many
  2050. Xrun-time values.
  2051. XThe command is also run through % interpretation, in case it is being called
  2052. Xfrom a range or search command.
  2053. X.Ip \+ 8
  2054. XStart the thread selector.
  2055. XIf the newsgroup is unthreaded, the subject lister is called instead.
  2056. X.Ip = 8
  2057. XList subjects of unread articles.
  2058. X.Ip # 8
  2059. XPrint last article number.
  2060. X.Sh "Pager Level"
  2061. XAt the pager level (within an article), the prompt looks like this:
  2062. X.Sp
  2063. X\*(--MORE\*(--(17%)
  2064. X.Sp
  2065. Xand a number of commands may be given:
  2066. X.Ip SP 8
  2067. XDisplay next page.
  2068. X.Ip x 8
  2069. XDisplay next page and decrypt as a rot13 message.
  2070. X.Ip d 8
  2071. XDisplay half a page more.
  2072. X.Ip CR 8
  2073. XDisplay one more line.
  2074. X.Ip q 8
  2075. XGo to the end of the current article (don't mark it either read or unread).
  2076. XLeaves you at the \*(L"What next?\*(R" prompt.
  2077. X.Ip j 8
  2078. XJunk the current article.
  2079. XMark it read and go to the end of the article.
  2080. X.Ip ^L 8
  2081. XRefresh the screen.
  2082. X.Ip X 8
  2083. XRefresh the screen and decrypt as a rot13 message.
  2084. X.Ip b 8
  2085. XBack up one page.
  2086. X.Ip t 8
  2087. XDisplay the entire article tree, including its associated subjects, and
  2088. Xcontinue reading.
  2089. X.Ip gpattern 8
  2090. XGoto (search forward for)
  2091. X.I pattern
  2092. Xwithin current article.
  2093. XNote that there is no space between the command and the pattern.
  2094. XIf the pattern is found, the page containing the pattern will be displayed.
  2095. XWhere on the page the line matching the pattern goes depends on the value
  2096. Xof the
  2097. X.B \-g
  2098. Xswitch.
  2099. XBy default the matched line goes at the top of the screen.
  2100. X.Ip G 8
  2101. XSearch for g pattern again.
  2102. END_OF_FILE
  2103.   if test 37631 -ne `wc -c <'trn.1.1'`; then
  2104.     echo shar: \"'trn.1.1'\" unpacked with wrong size!
  2105.   fi
  2106.   # end of 'trn.1.1'
  2107. fi
  2108. echo shar: End of archive 3 \(of 14\).
  2109. cp /dev/null ark3isdone
  2110. MISSING=""
  2111. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  2112.     if test ! -f ark${I}isdone ; then
  2113.     MISSING="${MISSING} ${I}"
  2114.     fi
  2115. done
  2116. if test "${MISSING}" = "" ; then
  2117.     echo You have unpacked all 14 archives.
  2118.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2119. else
  2120.     echo You still must unpack the following archives:
  2121.     echo "        " ${MISSING}
  2122. fi
  2123. exit 0
  2124.